.DaysHeader {
  display: flex;
  width: calc(var(--unit-count) * var(--days-cell-width));
}

.DayHeaderTime {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.WeeksHeader {
  display: flex;
  /* TODO: update this calculation when we add the option to hide weekends */
  min-width: calc(var(--unit-count) * 7 * var(--weeks-cell-width));
}

.MonthsHeader {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--months-cell-width), 1fr));
  min-width: calc(var(--unit-count) * var(--months-cell-width));
  grid-template-rows: auto auto;
}

.YearsHeader {
  display: grid;
  grid-template-columns: repeat(var(--unit-count), minmax(var(--years-cell-width), 1fr));
  grid-template-rows: auto;
  height: 100%;
}

.YearLabel {
  padding: var(--space-2);
  text-align: center;
  font-size: var(--font-size-2);
  font-weight: var(--font-weight-3);
}

.YearLabel:not(:last-child) {
  border-right: 1px solid var(--border-color);
}

.MonthsHeader .YearLabel {
  grid-row: 1;
  grid-column: var(--grid-column) / span var(--columns-span);
  border-bottom: 1px solid var(--border-color);
}

.MonthLabel {
  grid-row: 2;
  padding: var(--space-2);
  text-align: center;
  border-right: 1px solid var(--border-color);
  font-size: var(--font-size-2);
  color: var(--secondary-text-color);
}

.WeekDayCell {
  padding: var(--space-1);
  text-align: center;
}

.WeekDaysRow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  column-gap: var(--space-1);
}

.WeekDay,
.DayNumber {
  margin: 0;
  font-size: var(--font-size-2);
}
.WeekDay {
  color: var(--secondary-text-color);
}

.WeekDay[data-weekend] {
  color: var(--red-9);
}

.DayHeaderCell {
  width: var(--days-cell-width);
  text-align: center;
  padding: var(--space-2);
  box-sizing: border-box;
  position: relative;

  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.DayNumber {
  font-weight: var(--font-weight-3);
  color: var(--default-text-color);
}

.DayLabel {
  padding: var(--space-2);
  font-size: var(--font-size-2);
  font-weight: var(--font-weight-3);
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
}

.TimeHeader {
  display: flex;
  min-width: calc(var(--unit-count) * var(--time-cell-width));
}

.TimeHeaderCell {
  flex-grow: 1;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.TimeCellsRow {
  padding: 0 var(--space-2);
  display: grid;
  grid-template-columns: repeat(24, var(--time-cell-width));
}

.TimeCell {
  padding: var(--space-2) 0;
  text-align: center;
}

.TimeLabel {
  font-size: var(--font-size-2);
  color: var(--secondary-text-color);
}

.DayHeaderCell:not(:last-child),
.WeekDayCell:not(:last-child),
.TimeHeaderCell:not(:last-child) {
  border-right: 1px solid var(--border-color);
}

.MonthStart {
  font-size: var(--font-size-1);
  color: var(--secondary-text-color);
  background: var(--gray-2);
  height: 100%;
  margin: 0;
  position: absolute;
  display: flex;
  align-items: center;
  top: 0;
  bottom: 0;
  left: 0;
}

.MonthStartLabel {
  transform: rotate(-90deg);
}
